


public class TestSourceFilter extends InstrumentationFilterFramework{
	
	//This class is designed as a source filter for the instrumentation business case and designed to 
	//quickly test various inputs
	
	int mode;//used to create different filters to simulate different inputs
	
	TestSourceFilter(int mode){
		this.mode = mode;
	}
	public void run(){
		
		
		for(int i=0; i<5; i++){
			if(mode == 1){
				writeMeasurementToFilterOutputPort(Measurement.TIME, new Long(i*2+1));
			}
			else{
				writeMeasurementToFilterOutputPort(Measurement.TIME, new Long(i*2));
			}
			
			writeMeasurementToFilterOutputPort(Measurement.VELOCITY, 0.0);
			writeMeasurementToFilterOutputPort(Measurement.ALTITUDE, 0.0);
			
			writeMeasurementToFilterOutputPort(Measurement.TEMPERATURE, 32.0);
			
		}
		
		writeMeasurementToFilterOutputPort(Measurement.PRESSURE, 80.0);
		writeMeasurementToFilterOutputPort(Measurement.PRESSURE, 40.0);
		writeMeasurementToFilterOutputPort(Measurement.PRESSURE, 80.0);
		writeMeasurementToFilterOutputPort(Measurement.PRESSURE, 60.0);
		writeMeasurementToFilterOutputPort(Measurement.PRESSURE, 100.0);
		
		writeMeasurementToFilterOutputPort(Measurement.PITCH, 20.0);
		writeMeasurementToFilterOutputPort(Measurement.PITCH, 5.0);
		writeMeasurementToFilterOutputPort(Measurement.PITCH, 20.0);
		writeMeasurementToFilterOutputPort(Measurement.PITCH, 10.0);
		writeMeasurementToFilterOutputPort(Measurement.PITCH, 20.0);
		
		}
	}

